<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ include file="/common/pages/common.jsp" %>
<%@ include file="/common/pages/taglibs.jsp" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib prefix="ex" uri="/ex"%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link rel="stylesheet" href="<%=basePath%>/common/js/jquery-ui/themes/smoothness/jquery-ui.css">
<script type="text/javascript" src="<%=basePath%>/common/js/jquery-ui/jquery.ui.js"></script>
<script type="text/javascript" src="<%=basePath%>iccard/js/merchant_add.js"></script>
<title>merchant add</title>
</head>
<body>
	<input value="<%=basePath%>" id="contextPath" type="hidden"/>
	<form id="merchant_form" method="post"
	action="<%=basePath%>iccard/combocard/${nextaction}"
	onsubmit="">
	<input type="hidden" id="merchantId" name="merchantId" value="${merchant.merchantId}" />
	<div id="combocardset" class="easyui-panel" nofit=true
		style="padding: 2px; border: 1px solid #ddd;" title="新增商家"
		data-options="iconCls:'icon-bt',collapsible:true">
		<table width="90%">
			<tr>
				<td>商户名称：</td>
				<td><input class="easyui-validatebox"
					data-options="required:true" name="merchantName" id="merchantName"
					value="<c:out value="${merchant.merchantName}"/>" style="width: 200px" maxlength="128" ${param.readonly}/>
				</td>
			</tr>
			<tr>
				<td>商户地址：</td>
				<td><input class="easyui-validatebox"
					data-options="required:true" name="merchantAddr" id="merchantAddr"
					value="<c:out value="${merchant.merchantAddr}"/>" style="width: 200px" maxlength="128" ${param.readonly}/>
				</td>
			</tr>
			<tr>
				<td>商户编码：</td>
				<td><input class="easyui-validatebox"
					data-options="required:true" name="merchantCode" id="merchantCode"
					value="<c:out value="${merchant.merchantCode}"/>" style="width: 200px" maxlength="128" ${param.readonly}/>
				</td>
				
				<td>商户编号：</td>
				<td><input class="easyui-validatebox"
					data-options="required:true" name="merchantCode" id="merchantCode"
					value="<c:out value="${merchant.merchantCode}"/>" style="width: 200px" maxlength="128" ${param.readonly}/>
				</td>

			</tr>
			<tr>
				<td>开户名：</td>
				<td><input class="easyui-validatebox"
					data-options="required:true" name="merchantCode" id="merchantCode"
					value="<c:out value="${merchant.merchantCode}"/>" style="width: 200px" maxlength="128" ${param.readonly}/>
				</td>
				
				<td>开户账号：</td>
				<td><input class="easyui-validatebox"
					data-options="required:true" name="merchantCode" id="merchantCode"
					value="<c:out value="${merchant.merchantCode}"/>" style="width: 200px" maxlength="128" ${param.readonly}/>
				</td>

			</tr>
			<tr>
				<td>开户行：</td>
				<td><input class="easyui-validatebox"
					data-options="required:true" name="merchantCode" id="merchantCode"
					value="<c:out value="${merchant.merchantCode}"/>" style="width: 200px" maxlength="128" ${param.readonly}/>
				</td>
				
				<td>责任人：</td>
				<td><input class="easyui-validatebox"
					data-options="required:true" name="merchantCode" id="merchantCode"
					value="<c:out value="${merchant.merchantCode}"/>" style="width: 200px" maxlength="128" ${param.readonly}/>
				</td>

			</tr>
			<tr>
				<td>转账摘要：</td>
				<td><input class="easyui-validatebox"
					data-options="required:true" name="merchantCode" id="merchantCode"
					value="<c:out value="${merchant.merchantCode}"/>" style="width: 200px" maxlength="128" ${param.readonly}/>
				</td>
				
				<td>适用转账模板：</td>
				<td><input class="easyui-validatebox"
					data-options="required:true" name="merchantCode" id="merchantCode"
					value="<c:out value="${merchant.merchantCode}"/>" style="width: 200px" maxlength="128" ${param.readonly}/>
				</td>
				<td>模式：</td>
				<td><input class="easyui-validatebox"
					data-options="required:true" name="merchantCode" id="merchantCode"
					value="<c:out value="${merchant.merchantCode}"/>" style="width: 200px" maxlength="128" ${param.readonly}/>
				</td>

			</tr>
			
			
			<tr>
				<td>充值卡结算折扣：</td>
				<td><input class="easyui-validatebox"
					data-options="required:true" name="merchantCode" id="merchantCode"
					value="<c:out value="${merchant.merchantCode}"/>" style="width: 200px" maxlength="128" ${param.readonly}/>
				</td>
				
				<td>联系电话：</td>
				<td><input class="easyui-validatebox"
					data-options="required:true" name="merchantCode" id="merchantCode"
					value="<c:out value="${merchant.merchantCode}"/>" style="width: 200px" maxlength="128" ${param.readonly}/>
				</td>

			</tr>
			
			<tr>
				<td>商家业务类型：</td>
				<td><input class="easyui-validatebox"
					data-options="required:true" name="merchantCode" id="merchantCode"
					value="<c:out value="${merchant.merchantCode}"/>" style="width: 200px" maxlength="128" ${param.readonly}/>
				</td>
				<td>
					<input name="shoseactions" type="checkbox" value=""  class="" onclick="checkAction(this,'')" bchecked=""/>餐厅
					<input name="shoseactions" type="checkbox" value=""  class="" onclick="checkAction(this,'')" bchecked=""/>住宿
					<input name="shoseactions" type="checkbox" value=""  class="" onclick="checkAction(this,'')" bchecked=""/>食品
					<input name="shoseactions" type="checkbox" value=""  class="" onclick="checkAction(this,'')" bchecked=""/>服装
					<input name="shoseactions" type="checkbox" value=""  class="" onclick="checkAction(this,'')" bchecked=""/>纪念品
					<input name="shoseactions" type="checkbox" value=""  class="" onclick="checkAction(this,'')" bchecked=""/>酒吧
					<input name="shoseactions" type="checkbox" value=""  class="" onclick="checkAction(this,'')" bchecked=""/>咖啡店
					<input name="shoseactions" type="checkbox" value=""  class="" onclick="checkAction(this,'')" bchecked=""/>茶楼
					<input name="shoseactions" type="checkbox" value=""  class="" onclick="checkAction(this,'')" bchecked=""/>其他
				</td>
			</tr>
			
		</table>

		<div id="nrqx" class="easyui-panel" nofit=true
		data-options="title:'pos机S/N码',iconCls:'icon-bt',collapsible:true,tools:'#tt'">
		<div id="merctDiv" >
			<div id="merchantTemp_0" class="easyui-panel">
				<table width="90%">
					<tr>
						<td>POS机S/N码<pp>1</pp>：</td>
						<td><input class="easyui-validatebox"
							data-options="required:true" name="comboCardProductDetails[0].productNames"
							value="" style="width: 200px" maxlength="10"/>
						</td>
						<td align="right" colspan=3><a id="delm" href="#" class="easyui-linkbutton" onclick="javascript:delm(this);">删除POS机</a></td>
					</tr>
					
				</table>
			</div>
		</div>
		<div>
			<div style="padding: 10px 0 10px 10px"><a href="#" class="easyui-linkbutton" onclick="addm()">继续添加绑定POS机</a></div>
		</div>
	</div>

	</div>


	
	<div id="combocardtol" class="easyui-panel" nofit=true
		style="padding: 2px; border: 1px solid #ddd;" title=""
		data-options="iconCls:'icon-bt',collapsible:true">
		<table width="90%">
			<tr>
				<td>原总价格：</td>
				<td><input class="easyui-validatebox"
					name="comboCardOrignalPrice" id="comboCardOrignalPrice"
					value="<c:out value="${comboCard.comboCardOrignalPrice}"/>" style="width: 200px" readonly="readonly" />
				</td>
				<td>原优惠价格：</td>
				<td><input class="easyui-validatebox"
					name="comboCardFavorablePrice" id="comboCardFavorablePrice"
					value="<c:out value="${comboCard.comboCardFavorablePrice}"/>" style="width: 200px" readonly="readonly" />
				</td>
			</tr>
			<tr>
				<td>套餐销售价格：</td>
				<td>
				<input class="easyui-validatebox"
					name="comboCardSalePrice" id="comboCardSalePrice"
					value="<c:out value="${comboCard.comboCardSalePrice}"/>" style="width: 200px" readonly="readonly" />
				</td>
				<td>套餐加价百分比：</td>
				<td>
				<input class="easyui-validatebox"
					name="comboCardRaisePriceRate" id="comboCardRaisePriceRate"
					value="<c:out value="${comboCard.comboCardRaisePriceRate}"/>" style="width: 80px" readonly="readonly" />%
				</td>
			</tr>
			<tr>
				<td>可销售总份数：</td>
				<td>
				<input class="easyui-validatebox"
					name="comboCardTotalCopies" id="comboCardTotalCopies"
					value="<c:out value="${comboCard.comboCardTotalCopies}"/>" style="width: 200px" readonly="readonly" />
				</td>
				<td>总折扣：</td>
				<td><input class="easyui-validatebox"
					name="totalDiscount" id="totalDiscount"
					value="<c:out value="${comboCard.totalDiscount}"/>" style="width: 80px" readonly="readonly" />%
				</td>
			</tr>
		</table>

	</div>
</form>
<c:set var="showdiv" value="" />
<c:if test="${not empty param.readonly}">
	<c:set var="showdiv" value="none" />
</c:if>
<div id="btn_div"
	style="display: ${showdiv};text-align:center;margin-top:10px">
	<c:if test="${nextaction eq 'update'}">
			<ex:permissionShow actionCode="update_combocard">
			<a id="saveb" href="#" class="easyui-linkbutton" onclick="saveCombo();">保存</a>
			<a href="#" class="easyui-linkbutton" onclick="clearForm()">清除</a>
		</ex:permissionShow>
	</c:if>
	<c:if test="${nextaction eq 'add'}">
		<ex:permissionShow actionCode="create_combocard">
			<a id="saveb" href="#" class="easyui-linkbutton" onclick="saveCombo();">保存</a>
			<a href="#" class="easyui-linkbutton" onclick="clearForm()">清除</a>
		</ex:permissionShow>
	</c:if>
</div>
</body>
</html>